﻿@using GSLMS.Entity
@using GSLMS.Entity.Enum
@model GSLMS.Entity.TB_LOAN_MAIN
@{
    Layout = null;
    var ddlFinalApprover = ViewData["FinalApprover"] as SelectList;
    Model.LoanEXT = Model.LoanEXT ?? new TB_COL_LOANEXT();
    var isLastAuditUser = (int)ViewData["LastAuditUser"];
}
<div class="pageContent" layouth="5">
    <form method="post" id="formGLoanExt" action="DianDang/BMAudit/bManager/GLoanExt?OpID=@ViewData["OperateID"]" class="pageForm required-validate"
    onsubmit="return validateCallback(this, dialogAjaxDone)">
    <div class="pageFormContent" layouth="350">
        @Html.HiddenFor(model => model.ID)
        <p>
            <label>
                客户名称:</label>@Html.ValueFor(model => model.CUSTNAME)</p>
        <p>
            <label>
                贷款号:</label>@Html.ValueFor(model => model.LOANNO)</p>
        <p>
            <label>
                贷款金额:</label>@Html.ValueFor(model => model.AMT)</p>
        <p>
            <label>
                放款日期:</label>@Html.ValueFor(model => model.LOANDATE)</p>
        <p>
            <label>
                到期日期:</label>@Html.ValueFor(model => model.ENDDATE)</p>
        <p>
            <label>
                贷款综合费率:</label>@Html.ValueFor(model => model)</p>
        <p>
            <label>
                贷款期限:</label>@Html.ValueFor(model => model.LOANPHASE) @(Model.LOANPHASETYPE == 0 ? "天" : "月")</p>
        <p>
            <label>
                结欠本金:</label>@Html.ValueFor(model => model)</p>
        <p>
            <label>
                已还期数/总期数:</label>@Html.ValueFor(model => model)</p>
        <p>
            <label>
                贷款产品:</label>@Html.ValueFor(model => model.PRODUCTNAME)</p>
        <p>
            <label>
                展期开始期数:</label>@Html.ValueFor(model => model.LoanEXT.STARTPHASE)</p>
        <p>
            <label>
                展期后到期日:</label>@Html.ValueFor(model => model.LoanEXT.ENDDATE)</p>
        <p>
            <label>
                展期贷款利率:</label>@Html.ValueFor(model => model.LoanEXT.RATE)</p>
        <p>
            <label>
                展期管理费率:</label>@Html.ValueFor(model => model.LoanEXT.MANAGEFEERATE)</p>
        <p>
            <label>
                展期综合费率:</label>@Html.ValueFor(model => model.LoanEXT.GENERALRATE)</p>
        <p>
            <label>
                展期逾期利率:</label>@Html.ValueFor(model => model.LoanEXT.DELAYRATE) ‰/天</p>
        <p>
            <label>
                申请人:</label>@Html.ValueFor(model => model.LoanEXT.APPLYBY)</p>
        <p>
            <label>
                申请日期:</label>@Html.ValueFor(model => model.LoanEXT.APPLYDATE)</p>
        <p>
            <label>
                展期评审条件:</label>@Html.ValueFor(model => model.LoanEXT.REVIEW)</p>
        <p>
            <label>
                备注:</label>@Html.ValueFor(model => model.LoanEXT.REMARK)</p>
        <p>
            <label>
                审批日期:</label>@Html.ValueFor(model => model.CONFIRMDATE)</p>
        <p>
            <label>
                审批人:</label>@Html.ValueFor(model => model.CONFIRMBY)</p>
        <p style="width: 95%">
            <label>
                意见：</label>
            @Html.TextArea("Remark", new { style = "width:100%;height:60px" })
            @Html.Hidden("hidActiondo");
        </p>
        <p style="display:@(isLastAuditUser==1?"none":"inline");">
            <label>
                提交到：</label>
            @Html.DropDownList("toUser", ddlFinalApprover, new { @class = "combox" })
            @Html.Hidden("hidActiondo");
        </p>
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="button" onclick="GLoanExt(0)">
                            同意</button></div>
                </div>
            </li>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="button" onclick="GLoanExt(1)">
                            拒绝</button></div>
                </div>
            </li>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="button" onclick="GLoanExt(2)">
                            退回</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>
<script>
    function GLoanExt(action) {
        $form = $("#formGLoanExt");
        $("#hidActiondo", $form).val(action);
        if (action > 0) {
            var Remark = $("#Remark", $form).val();
            if (Remark)
            { validateCallback($form, dialogAjaxDone); }
            else {
                alertMsg.error("请输入意见!");
            }
        }
        else {
            validateCallback($form, dialogAjaxDone);
        }
    }
</script>
